package jee.boot.common.basic;

import java.util.ArrayList;
import java.util.List;
/**
 * 关联表
 */
public class JoinTable {
    private String tableName;//关联表名
    private String join = "LEFT JOIN ";// 关联方式,默认 left join
    private String key="id";// 关联表字段,默认使用id进行关联,
    private String alias;// 关联表别名
    private String fk;// 外键字段
    private String fkAlias = "a";// 外键表别名,默认跟主表关联,即为: a
    private String conditions = "";//额外的过滤条件
    private List<AttrField> columns = new ArrayList<>();// 所有列

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getJoin() {
        return join;
    }

    public void setJoin(String join) {
        this.join = join;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getFk() {
        return fk;
    }

    public void setFk(String fk) {
        this.fk = fk;
    }

    public List<AttrField> getColumns() {
        return columns;
    }

    public void setColumns(List<AttrField> columns) {
        this.columns = columns;
    }

    public String getConditions() {
        return conditions;
    }

    public void setConditions(String conditions) {
        this.conditions = conditions;
    }

    public String getFkAlias() {
        return fkAlias;
    }

    public void setFkAlias(String fkAlias) {
        this.fkAlias = fkAlias;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }
}
